package com.ll.wechat.base.utils.widget;

import android.content.Context;
import android.widget.Toast;

/**
 * Toast的封装类。
 * 为了防止在上次吐司还没消失的时候弹出新的吐司
 * @ClassName: MyToast 
 * @author yeliangliang
 * @date 2015-7-22 下午2:37:50
 */
public class MyToast {
	public static Toast toast;
	@SuppressWarnings("static-access")
	public static void showToast(Context c,int s){
		if (toast==null) {
			toast = new Toast(c);
			toast.makeText(c, s, Toast.LENGTH_SHORT).show();
		}else {
			toast.makeText(c, s, Toast.LENGTH_SHORT).show();
		}
	}
	@SuppressWarnings("static-access")
	public static void showToast(Context c,String s){
		if (toast==null) {
			toast = new Toast(c);
			toast.makeText(c, s, Toast.LENGTH_SHORT).show();
		}else {
			toast.makeText(c, s, Toast.LENGTH_SHORT).show();
		}
	}
}
